package cn.how2j.springcloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RestController
public class AController {
	@Autowired
    SchedualServiceA SchedualServiceA;
	@Value("${server.port}")
	String port;
	 
   @GetMapping(value = "/hi2")
    public String sayHi(@RequestParam String name){
        return SchedualServiceA.sayHiFromClientOne(name) + " ,i am from port:" + port;
   }
    
   @GetMapping(value = "/hi")
    public String sayHi22(@RequestParam String name){
        return "hi aa " + name;
	
}
}